<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<div>
    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Replication Group*:</div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <input type="text" id="editVirtualHostNode.groupName"
                   data-dojo-type="dijit/form/ValidationTextBox"
                   data-dojo-props="
                                    name: 'groupName',
                                    placeHolder: 'Group Name',
                                    required: true,
                                    disabled: true,
                                    title: 'Name of the group'" />
        </div>
    </div>
    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Address*:</div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <input type="text" id="editVirtualHostNode.address"
                   data-dojo-type="dijit/form/ValidationTextBox"
                   data-dojo-props="
                                    name: 'address',
                                    placeHolder: 'host:port',
                                    required: true,
                                    disabled: true,
                                    title: 'Node address of the group member'" />
        </div>
    </div>
    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Configuration store path:</div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <input type="text" id="editVirtualHostNode.storePath"
                   data-dojo-type="dijit/form/ValidationTextBox"
                   data-dojo-props="
                                  name: 'storePath',
                                  title: 'File system location for the store',
                                  promptMessage: 'File system location for the store'" />

        </div>
    </div>

    <div class="formBox clear">
        <fieldset>
            <legend>Permitted group nodes</legend>
            <div class="clear">
                <div class="formLabel-labelCell tableContainer-labelCell">Permitted addresses*:</div>
                <div class="formLabel-controlCell tableContainer-valueCell addPermittedNodeList">
                    <select type="text" id="editVirtualHostNode.permittedNodesList"
                            data-dojo-type="dijit/form/MultiSelect"
                            data-dojo-props="
                                      multiple: true,
                                      name: 'permittedNodeList',
                                      readOnly : 'true',
                                      excluded: true,
                                      title: 'Enter permitted nodes'">
                    </select> <!-- must use closing tag rather than shorthand - dojo bug? -->
                    <input type="hidden" id="editVirtualHostNode.permittedNodes"
                           data-dojo-type="dijit/form/ValidationTextBox"
                           name="permittedNodes"/>
                </div>
                <div id="editVirtualHostNode.permittedNodesList.tooltip"
                     data-dojo-type="dijit/Tooltip"
                     data-dojo-props="connectId: 'editVirtualHostNode.permittedNodesList',
                                          label: 'Only node addresses appearing in the list will be permitted to join the group.'">
                </div>
                <button data-dojo-type="dijit/form/Button" id="editVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
            </div>

            <div class="clear"></div>
            <div class="clear">
                <div class="formLabel-labelCell tableContainer-labelCell">Address:</div>
                <div class="formLabel-controlCell tableContainer-valueCell">
                    <input type="text" id="editVirtualHostNode.permittedNode"
                           data-dojo-type="dijit/form/ValidationTextBox"
                           data-dojo-props="
                                      name: 'permittedNode',
                                      placeHolder: 'host:port',
                                      intermediateChanges: true,
                                      title: 'Enter address of node to be permitted into the group',
                                      promptMessage: 'Address of node to be permitted into the group'" />
                </div>
                <button data-dojo-type="dijit/form/Button" id="editVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button>
            </div>
        </fieldset>
    </div>

    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Allow this node to operate solo: </div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <input type="checkbox" id="editVirtualHostNode.designatedPrimary" checked="checked"
                   data-dojo-type="dijit/form/CheckBox"
                   data-dojo-props="
                                    name: 'designatedPrimary',
                                    required: false,
                                    title: 'Designate node as primary allowing it to operate solo in a group of two.',
                                    promptMessage: 'Designate node as primary allowing it to operate solo operate solo in a group of two'" />
        </div>
    </div>
    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Election priority of this node: </div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodePriorityStore"
                 data-dojo-props="data: [
                                                      {id: '0', name: 'Never'},
                                                      {id: '1', name: 'Default'},
                                                      {id: '2', name: 'High'},
                                                      {id: '3', name: 'Highest'}
                                                   ]"></div>
            <input id="editVirtualHostNode.priority" data-dojo-type="dijit/form/FilteringSelect"
                   data-dojo-props="
                                name: 'priority',
                                required: false,
                                store: nodePriorityStore,
                                title: 'Set the election priority associated with this node',
                                promptMessage: 'Election priority associated with this node.<br/>Elections will choose the node with the most recent transactions.<br/>If there is a tie, priority is used as a tie-breaker.',
                                searchAttr: 'name'" />
        </div>
    </div>
    <div class="clear">
        <div class="formLabel-labelCell tableContainer-labelCell">Required minimum number of nodes: </div>
        <div class="formLabel-controlCell tableContainer-valueCell">
            <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodeQuorumOverrideStore"
                 data-dojo-props="data: [{id: '0', name: 'Majority'}]"></div>
            <input type="text" id="editVirtualHostNode.quorumOverride"
                   data-dojo-type="dijit/form/FilteringSelect"
                   data-dojo-props="
                                name: 'quorumOverride',
                                required: false,
                                title: 'Select minimum required number of nodes or choose Majority',
                                promptMessage: 'Modifies the minimum number of nodes required to be present to elect a master or commit transactions.<br/>Majority signifies that a natural majority of nodes must be present.',
                                store: nodeQuorumOverrideStore,
                                searchAttr: 'name'" />
        </div>
    </div>

    <div class="clear"></div>
</div>
